﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace App.CTL
{
    public partial class TxtBForm : Form
    {
        public TxtBForm()
        {
            InitializeComponent();
        }

        public List<string> SelectedItem
        {
            get
            {
                return cbList1.SelectedList;
            }
        }

        public string SelectedItemString
        {
            get
            {
                return cbList1.SelectedText;
            }
        }

        public List<string> Data
        {
            set
            {
                cbList1.Items.Clear();
                foreach(string str in value)
                {
                    cbList1.Items.Add(str);
                }
            }
        }


        private void btn1_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnT1_Click(object sender, EventArgs e)
        {
            cbList1.SelectAll();
        }

        private void btnT2_Click(object sender, EventArgs e)
        {
            cbList1.SelectAll(false);
        }
    }
}
